
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Feedback](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Name] [varchar](250) NULL,
	[Subject] [varchar](250) NULL,
	[Email] [varchar](250) NULL,
	[Descriptions] [varchar](500) NULL,
	[CreatedDate] [datetime] NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


CREATE PROCEDURE SP_FeedBackSave
			@Id int OUTPUT,
			@Name varchar(250)
           ,@Subject varchar(250)
           ,@Email varchar(250)
           ,@Descriptions varchar(500)
           ,@CreatedDate datetime
AS
BEGIN
	INSERT INTO [Azad].[dbo].[Feedback]
           ([Name]
           ,[Subject]
           ,[Email]
           ,[Descriptions]
           ,[CreatedDate])
     VALUES
           (@Name
           ,@Subject
           ,@Email
           ,@Descriptions
           ,@CreatedDate)

		   SET @Id = SCOPE_IDENTITY()  


END
GO

CREATE PROCEDURE Get_FeedBackTwoDates
	@Todate datetime,
	@FromDate datetime
AS
BEGIN
	
Select * from Feedback
where CreatedDate between @Todate and @FromDate
END

